public class Test3_1{
public static void main(String[] args){
StringBuilder resultBuilder = new StringBuilder();
for(int i=100;i<=999;i++){
int hundreds =i/100;
int tens =(i/10)%10;
int units = i%10;
int cubeSum =hundreds*hundreds*hundreds+tens*tens*tens+units*units*units;
if(cubeSum==i){
resultBuilder.append(i).append(",");
}
}
if(resultBuilder.length()>0){
resultBuilder.deleteCharAt(resultBuilder.length()-1);
System.out.println(resultBuilder.toString());
}else{
System.out.println("没有找到水仙花。");
}
}
}
